package com.wwl.springcloud.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/8/9 15:49
 * @description:
 */
@RestController
@Slf4j
@Api(value = "/consumer",description = "zookeeper", tags = {"payment"})
public class OrderZKController {
    public static final String INVOME_URL="http://cloud-provider-payment";
    @Resource
    private RestTemplate restTemplate;
    @ApiOperation("检测zookeeper注册是否成功")
    @PostMapping("payment/zookeeper")
    public String payment(){
        return restTemplate.postForObject(INVOME_URL+"/payment/zookeeper",null,String.class);
    }

}
